package top.kaoshanji.ch08;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import top.kaoshanji.ch08.pair1.ArrayAlg;
import top.kaoshanji.ch08.pair1.Pair;

/**
 * 代码清单 ch08-01：泛型类示例(8.2节)
 * author kaoshanji
 * ^_^
 * create time 2024/11/28 16:44
 */
public class PairTest1 {

    private static final Logger logger = LogManager.getLogger(PairTest1.class);

    public static void main(String[] args) {
        logger.info("...代码清单 ch08-01：泛型类示例(8.2节)...");

        String[] words = { "Mary", "had", "a", "little", "lamb" };
        Pair<String> mm = ArrayAlg.minmax(words);

        System.out.println("min = " + mm.getFirst());
        System.out.println("max = " + mm.getSecond());

    }

}
